# 接收传入的字符串，将字符串反转传回

def str_reverse(s):
    i = len(s)
    s_new = ''
    for x in s:
        s_new = s_new + s[i - 1]
        i -= 1
    return s_new

# 按照下标x和y，对字符串进行切片

def substr(s,x,y):
    s_new = ''
    s_new = s[x:y]
    return s_new
